import {UploadFile, UploadProgressEvent, UploadRequestOptions} from "element-plus";
import {UploadRawFile} from "element-plus/es/components/upload/src/upload";

export interface CustomUploadFile extends UploadFile{
    raw?: CustomUploadRawFile;
    message?: string;
    webkitRelativePath?: string;
    [key:string]: any
}

export interface CustomUploadRawFile extends UploadRawFile {
    data: ExtendedData;
    blobs: Blob[];
    loaded: number;
    readed: number;
    total: number;
    status: string;
}

export interface CustomUploadProgressEvent extends UploadProgressEvent {
    status: string;
    readed: number;
    loaded: number;
}

export interface CustomUploadRequestOptions extends UploadRequestOptions {
    file: CustomUploadRawFile;
}

export interface ExtendedData {
    id: number;
    name: string;
    size?: number;
    index: number;
    limit: number;
    [key:string]: any
}